<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" />
        <title>网站信息</title>
        <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}"/>
        <link rel="stylesheet" th:href="@{/iconfont/iconfont.css}"/>
        <link rel="stylesheet" th:href="@{/css/app.css}"/>
    </head>
    <body>
        <div class="z-content">
            <div class="z-card">
                <div class="z-card-header">基础信息</div>
                <div class="z-card-body">
                    <form id="siteForm" class="form-horizontal">
                        <div class="box-body">
                            <div class="form-group">
                                <label for="SITE_NAME" class="col-lg-2 col-sm-3 control-label">网站域名：</label>
                                <div class="col-lg-6 col-sm-8">
                                    <input th:value="${siteInfo.SITE_HOST}" type="text" class="form-control" id="SITE_HOST" name="SITE_HOST" require="">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="SITE_NAME" class="col-lg-2 col-sm-3 control-label">网站名称：</label>
                                <div class="col-lg-6 col-sm-8">
                                    <input th:value="${siteInfo.SITE_NAME}" type="text" class="form-control" id="SITE_NAME" name="SITE_NAME" require="">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="SITE_KWD" class="col-lg-2 col-sm-3 control-label">网站关键字：</label>
                                <div class="col-lg-6 col-sm-8">
                                <textarea th:text="${siteInfo.SITE_KWD}" rows="2" type="text" class="form-control" id="SITE_KWD" name="SITE_KWD" require="">
                                </textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="SITE_DESC" class="col-lg-2 col-sm-3 control-label">网站描述：</label>
                                <div class="col-lg-6 col-sm-8">
                                <textarea th:text="${siteInfo.SITE_DESC}" rows="2" type="text" class="form-control" id="SITE_DESC" name="SITE_DESC" require="">
                                </textarea>
                                </div>
                            </div>
                            <button type="button" id="btn_save" class="btn btn-primary">保存</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <script th:src="@{/js/jquery.min.js}"></script>
        <script th:src="@{/js/bootstrap.min.js}"></script>
        <script th:src="@{/js/app.js}"></script>
        <script>
            $(function () {
                $("#btn_save").click(function () {
                    if(App.validate("#siteForm")){
                        App.mask("#btn_save");
                        App.postAjax("/admin/site/info/edit",$("#siteForm").serialize(),function (data) {
                            App.unmask("#btn_save");
                            App.msgS(data.msg);
                        })
                    }
                })
            })
        </script>
    </body>
</html>